package com.sakura.mybatis.version2.mapper;

import com.sakura.mybatis.version2.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author Sakura
 * @Date 2022/11/2 11:59
 * @Version 1.0
 */
public interface ParameterMapper {

    /**
     * 查询全部用户信息
     * @return
     */
    List<User> getAllUser();

    /**
     * 根据用户名获取用户信息
     * @param userName
     * @return
     */
    User getUserByUserName(String userName);

    User getUserByUserNameAndPassword(String userName,String password);

    List<User> getListByMap(Map<String, Object> reqMap);

    int insertUser(User user);

    User checkLoginByParam(@Param("a") String username, @Param("b") String password);

    /**
     * 测试模糊查询
     * @param mohu
     * @return
     */
    List<User> testMohu(@Param("mohu") String mohu);

}
